#include <iostream>
using namespace std;
int main()
{
int m,sum=0;
cin>>m;
do
{
sum=sum*10+m%10;
m/=10;	
}while(m!=0);
cout <<sum<<endl;
return 0;	
}
//输入123 输出321
